import asyncio
from pyppeteer import launch


async def main():
    browser = await launch(headless=False, devtools=True)
    page = await browser.newPage()
    await page.goto('https://www.baidu.com')
    await asyncio.sleep(100)


asyncio.get_event_loop().run_until_complete(main())

# 待修改
# import time
# from pyppeteer import launch
#
#
# def main.py():
#     browser = launch(headless=False)
#     time.sleep(1000)
#     page = browser.newPage()
#     page.goto('https://baidu.com')
#     time.sleep(1000)
#     browser.close()
#
#
# if __name__ == '__main__':
#     main.py()
